Added debugging commands, cleaned code, added Java Docs.