Clean up window manager module a bit