Cleanup trailing whitespace
Add more assert calls
Merge pull request #1 from chadicus/master

Add a couple more asserts