Further work on the compiler rewrite. Several more tests pass now.