Removed redundant check for market state equality
Renamed parameters to match our coding practice