Request now returns null instead of false for non-existent properties. Improved detection for ajax requests.

Response now automatically creates JSON when an array is set as its content. The correct content type header is not yet set, however.