added zlib and reorgnaized some stuff