Separated bag preparer code from executable