updated the encoder with some bug fixes, every byte now gets an encoding
cleaned up formatting