Make TypeRange and TypeSpec clearer

Adds documentation and cleans up some tests