Cleanup and type annotations
Moar annotations!