Add some more typing.
Fix main.html
Fix returns for natives.
More cleanup and types.