Fixed overflow bug.
Added tangent visualization back in (and support for drawing with different draw modes).