refactoring/code cleaning generator templates