Replace the use of globals in Comment with DI.