Working encoder and decoder - Made with practically no help | ScratchStats