Working on the type solver