Type hinting for various methods, as well as general code clean up.
Commit for supercomputer.