Remove unused methods and upate tests.