Added some more features to the encoder. I have no idea how to do match finding.