Some refactor + some loggers