clean up as per Nacho's suggestions