Removes whitespace from comma separated lists in sub arrays
Restructured code to compile fully within one javascript file