cleaned up some, added alt_cnt to saved measurements, fixed bug in func_append