More debugging, improved request handling, other random fixes