CombineEdges function added, storing edges in consecutive fashion, added x,y,z,vx,vy,vz to globalstep, arranging edges smartly