Probably you should remove all the data structures used to check whether to return the ls output details, if these data structures are no longer used (i.e. don't leave unused stuff around).