Added unit tests (Closes #1)