Moved combinatorics method into a new tools/combinatorics.py file.