Remove unused legacy Java code