Move artifact storage and cleanup to their own macros