add Python 3 implementation of intToBinStr and binStrToInt, and cleaning