refactored a bunch.  Still a javascript bug somewhere that things dont
some things are not waiting till a dependency has finished loading.