PCT-808: Include better output structure + fix tests