Added encode list.
Added encoder and decoder tests.