Several at once:

- Add subsample().
- Fix curry().
- Run tests only if commanded to.
- Fix issues in tests with deleting inner-scoped vars.