fixes duplicate fields, removes print statements