Abstracted tests. Rewrote exception tests. Other minor changes.