First commit of new typing code