Made a bunch of compile errors easier to read

Fixed a few bugs in the process, too.
Probably also created a few, need better checks for resulting
statements.