I've got two other modules I'm planning to write, hopefully this week, that I think might need the function.

The output and clean up looks good, thanks.