clean up preindex code
Merge pull request #3197 from dimagi/deploy-process

clean up preindex code