Refactoring + MATSim integration