Clean up your code with AJAX