implemented onRemove for autocomplete
moved immutable update to module, adding more functions to autocomplete