Core API cleanup and javadoc