Added tests for LZW and made a few changes