Removed unused code and fix Python 3 failures, and added a basic GUI test