tidied up code generation through active annotations