Added tests and a bit of refactor
Merge pull request #2 from LandRegistry/add-tests-and-refactor

Added tests and a bit of refactor