Getting rid of various PHP notice warnings

* Assigned empty defaults on templates
* Added some variable checking
Merge pull request #81 from TheSerapher/php-notice-fixes

Getting rid of various PHP notice warnings