General fixes and improvements.

This replaces: #1 

I'm interested in what you guys think. Is creating the struct for passing data to the view the right way?