Quality refactoring + API cleaning + javadocs