refs added, some todos resolved