Rename nextChildID to lastChildID. Move idToWindow() to window.go