Changed a little on the java files to tidy up the metaclass