Added let() to tests, refactored
f