fixed include guards
various fixes and improvements suggested by AndyS
improved zoo_get