Typo fix
Another typo
Rename the current window variable to avoid collision with function.
Change command line arg to bytes object
Seems to work, probably some bugs to work out.