Removed combinations from itertools (wer have our own)
Adapted code to match pep8
Adapted tests