Format docstring
Improve the unassignment, if the property is empty, remove the property altogether
Refactor common behavior