Better request handling for the server, better request handling tests