cleaned up message formatting, log formatting, and extraneous return on main