working copy

- added a threshold
- added headings to the menu
- renamed some ambiguous variables

Still to do:
- Rework the menu
- clean up the pit