Optimize Exp and big integer right shifting

Remaining changes are cleanup