[PLAT-5364] Cleaned code and javadoc.