moved all dependency injection out to a wiring class, with a few tests