cleaned up some code slightly in JavaTranslator