Finished first pass at removing jquery dependency