Refactor so that the generation of javascript intermediary string's are in a passed struct instead. Allowing for easier addition/removal