Refactor. Add "clear" feature