Update pom.xml and code improvement