refactor and simplify code generation

new templates, resolvers dynamic loading, entry_points