cleanup and jdk7 syntax fixes