Refactor AJAX Again

Refactored AJAX to reduce duplicate code...