Fixed syntax error in plots.py
Fixed display hook return value when traceback occurs
Fixed base64 encoding to be Python 2 and 3 compatible