simplify lzw implementation
First working commit