Made it AJAX, cleaned some stuff up