Cleanup function examples
Example for issue #1057