Added clear() method.