Moving mainLoop to Mighty.
refactoring logger.