Code refactoring on JSON generate and some changes on pom.xml