Refactor syntax tree tests a bit