simplified version of mlzloader (unused functions and procedures removed)