Some cleanup refactoring around handling generation, and added support
for techniques.