Complete port to pure Python, added Tkinter window