update directory structure and cleanup