Move code in main to new functions
Added json-lib dependency to pom.xml, Related #6
Read parameters in json syntax, Related #6