Pato: refactor to if -> then
Remove typing.js