cleanup on files and functions