Finish the typer (almost, haven't checked against the spec yet)

Good catch. Fixed and added a test.