Improvements to use clear() function definition.