listrefs working, added table_seq, fixed bugs