Starting to refactor phhyscis a bit to allow running in the worker or not, based on a flag