Added encoder/decoder. RegExps are calculated on user's side.
Finished sorting.
Issue #36