optimize for performance, made existing record removal optional

Signed-off-by: nixnodes <code@eth.si>