Various updates. Added C++03 impl. Removed yield from for python2