JSON refactoring of a few methods; fixing JavaScript issues