Moved all routines to functions in /functions/JsJsonFunc.js