Move more variables to `state` and `config` objects