Clean up class loading and code generation