Py3 fixes



Some thing are still left to be done in this branch before this is merged::

1) Figure out a solution to the "TypeError: can't convert return value to desired type" error. on py3 and
2) Make sure that the offset used if correct in every situation.