removes old files, fixes image ref