set correct json content type header on ajax requests
moar debug
js lint fixes