fixed path issues with hello world example
added a function for attaching variables to the controller.

I hinted at this in #1. It needed to be done because the controller's constructor is now called by the framework.