Fix AJAX requests and JSON serialization/deserialization.