code cleanup, fixed errors related to market price updates