I would argue that he is mainly following the code out of pragmatism and for his own survival. And there's multiple times where he hides evidence to prevent the police from arresting someone, so he can kill them.