Add abstract types and generic functions