Adds onRemove callback to popup, adds docs for all callbacks #815