Added test in main.
Fixed merge conflict.
Improved decoding test.