initial refactor breaking up to be more package like.