Made tests work on windows. Also got a bit closer on getting setfocus to work