Added constructors for block and inline elements.

This gives a level of abstraction, allowing us to change
the underlying JSON representations without requiring changes
to filters.