refactor to make more use of IoC container