Refactor logService and randoService