Fix some minor code problems, and start working on the decl tests.