Types, algebras and modeling