Tornado API bug fixes and tweaks.