Changed singleton to be constructor injected.