Massive overhaul

Removed most usage of jQuery for performance