Rewritten to PyQt5 and Python3