processing code cleaning and java7 migration