Ported new classes from Atlantis.net to java version.