Changed tree_contains to use a binary search, it was a bottleneck
Fixed some memory issues
Merge branch 'LZW'