Rewrote helper file in JavaScript. Moving initialize function.