added comments to auto-document the type system