Minor changes to typewriting code