Improve printing of transitions
Factor tests
Add tests for primitives
Fix (-) primitive