Remove unused imports, commented out unused variables, cleaned up compiler warnings. No change to functionality.
reverting changes that require Java 1.7, to maintain compatability with 1.6