Instead of using global vars, just use state handled by the Dsl module.