add get_parents and misc cleanup