Error handling for unsuccessful ajax calls
Cleaned out commented-out code
Merge branch 'master' into responses