Add: cleaned the logging and data collector related code