Functions, Type Checking, Error Handling, and Testing