Add or update some log messages in main.cpp. Code refactoring. Add some comments.
Issue #127 (closed)