Cleanup code, use JQuery for everything