The logic for encoding and decoding implemented in separate modules
Added orderby token