improve window numbering
fix home directory weirdness