move init_crunch() to server.py and use `env` dict to store common references