Extracted typedef decls into their own production (which also disallows them in function scope).
Various fixes.