Fixes to python bitshifting issues, and also increase the exponent limit