I added a return type to each pseudo-code-style function signature.