Removed java 7 specifics so the thing should build and work on java 6 also