More type and spec improvements