Deletes unused file and renames method