Refactored to use IHttpActionResult