Remove jQuery dependency and restructure.