Code cleanup
Removed Diamond operator and Stringswitch for Java 7 compat :-(