changed ViewFactory to use functions as handlers, rather than classes