Refactor status-msg-map-updation related code