Type Checking

Completed type checking as well as formatted files.