code cleaning and refractoring

refractoring of messages for logging progress of optimization
peo8