Initial undo work
Initial work on line
fixed a stupid mistake
Made the paint function more efficient.