Reformatted handle_request