More checks for validation.
Make tests more functional (fewer side-effects).
Add more alignment expression validators.

Also add the get_alignment_expression_spans() function, and make get_content() more robust to missing targets.