Added some comments, missing tests and increased coverage to 88%