Minor tidy up of Java code