Updated to most recent code. Switching to PyQt after this