This gets everything working idempotently with SGE cleaned up