Seperated generated methods from the CodeGenerator to a session.