rearranged internal modules to placate haddock