Added handling for some edge cases, more tests.
Version bump
Merge branch 'develop'