The logic for encoding and decoding moved to separate modules
Added orderby token