Updated to work with latest connector api. Implemented unmap.