Updated the tools so that they compile with 0.9.5

Hi!

Thanks for making this script, it really helps when editing code. I hacked a few files so that things could work with TS 0.9.5; please merge at your discretion.