Added some tests, refactored code and documented code