Code cleanup, more exceptions (refs #327)

Several exceptions, 'x as y' and parenthesis around Exception arguments
during raise
Fix idioms and whitespace (refs #327)
More octal fixes (refs #327)