refactoring market state and handling of deltas in front end