Several cleanups in virtual memory code.