Use let bindings, and rename functions