Speed improvements, due to type-hinting and changes in escaping

HTML escaping is about 2x as fast (was previously eating up 35-40% of runtime)

Type-hints comprise most of the overall ~2-3x improvement.