build out directory structure and refactor