Added comments and tests.