Final cleanup of code and reinstated copy rule for .java files