refactor js and remove old java files
refactored java json code to create with objects