Some class definitions for code generation