Allow negative rotations and other material sequences. Add slightly more intelligent error checking, and replace deprecated atof / atoi with strtol / strtod.