Removed sending headers, changed to returning content type