Clean up python imports.
Correct some uses of `isinstance`.
Add `self` to some methods.
Break out error string interpolation that was missed by moonscript.