Fixed version of kwind
still a couple of TODOs