Some changes

added to compile and run with Java 6 and Java 7