Added Command Pattern for AJAX