bug fix: wires not handles properly and some other issues with undo/redo

was using data as (x0,y0,x1,y1), now using 'standardized' (startx,starty,endx,endy).