some fixes to make it compile (mainly zip)
upgrading & cleaning up api code