Tk GUI works properly now (mostly)