Add Javadox and fix refactoring mess

Great, another manual merge...