First attempt at adding methods to code generation