Began adding logic for AJAX calls.