Towards a Theory of Criminal Law