Refactored everything into a ComponentFactory.  It all works, but not sure I like it.  Definetly needs some refactoring to clean things up.