Minor changes: JSON Code refactoring, updated testcases and JavaDocs.