Added ability to pass varables into views

Also changes template