Inital LZW implementation