Created RBitslice function and associated test. Also fixed various
functions so that output from RBitslice is correct.