Added comments and more tests