Rewrite all instances of type in a line

Fixes #10