Clean up AST interning of primitives; add lots of tests for Model