Remove unused method.
jar: export all public methods.
Refactor common code.