Add expressions and fix illegal content nesting.

This commit implements #2 and fixes #4