Refactor decompression code; add test for flattening zip file with conflicts; added Scaladoc