Removing dead code.
Added proper calculation of angled start and endpoints of arcs.