added printed solution summary and made residual plotting optional