Add extra tests for edge cases
Merge branch 'improve_tests'