Addressed review comments and fixed unit test.