Move encoding/decoding code into separate modules/folders.
Initial work on Decoder API.
More work on decoding API.