Fixed some minor bugs.
Got the one existing test running again.