Add more tests. Added comments on some methods.