All errors are handled. Everything tested except main.