improved error checking; guess/check sign of theta

Theta always has the right sign now, but it feels wrong.
cleaned up case creation a bit
more crap on the sign of theta