Cleanup code and used Boost::Format to sanitize cout stream management