Improved error handling; added CSS; JSON now returned instead of plaintext