Better kind inference