Updated and ready for submission

 - corrected encode/decode X to take arbitrarily large offsets