Tried to make the code python 3 compatible; removed (unnecessary) dependence on bob.