Added pom and changed to be compatible with Java 6.