Got the application working with AJAX