Update code to use proper DI.

Signed-off-by: crynobone <crynobone@gmail.com>