Consolidated ajax calls and changed error message display method to take a message parameter.