refactor to use fewer directories