Initial updates for python3 compatability (not all functionality has been tested)