Put function matching in its own function
Types now have constructors