Cleanup of the template code and adding specific window bounds

This adds some window bounds to the templates and cleans out some commented idiomatic code.