Corrected bit-rolling implementation to match Javascript's one.-
Added more test cases.-