Mini refactor.
Update ajax calls treatment based on new server changes for returning HTTP response codes.