Starting to implement kind checking algorithm