Split CM11 code to a separate file