Implements rendering sentences and various other fixes.

TODO: Implement rendering predicates first.