Refactor to not require JQuery, currently a WIP