Controller Generator

generateController takes a controller name and a set of states, and
produces a controller consisting of a method for each state and a
view/template to match it.