Added a few basic unit tests and some documentation