Refactored out returning headers on 200 OK to a separate method