Fix menu for multi-level and refactor interfaces, javadoc etc