Added --version flag to CLI
Minor internal changes to codebase

- Rewrote list membership tests to use sets
- Prefixed functions within functions with an underscore