Increase pythonicity of the remove function