Made content_type an attribute rather than being hard coded