cleanups, and better helper function example