Decoding was implemented.
Tests was refactored.