Various bug fixes and more tests
Update version
Merge pull request #3 from bakura10/bug-fixes

Bug fixes