clear up files, add convenient data structure