Updated java version and refactored pom.xml