Added controller generator and refactored other generators and tests