Merge pull request #210 from vandenoever/typechecking

Fix more types in runtime.js.