Fix some undefined index/variable PHP Notices

Closes #23