Refactor some code in Plug.Conn.Utils