clean up and sort files