refactored the files into directories