Use optional space with throws clause
Do an initial pass to collect types to allow for circular definitions