Several bugfixes
Cleaned up some code
Fixed up comments
Added sample data