Started on the type inference refactoring.