Refactor tests

Sample content is now a syntax tree instead of plain text. A bit harder to read, but probably easier to maintain.