Added comments. Added tests.