cancel offer function; misc. cleanup