Implemented clear method.