changed drawing algorithms, testing
fixed some bugs in draw code
draw code seems ok, added degen fallbacks