Various abstraction changes

Abstracted views, controller and form generation to reduce code
duplication