some clean up & comments