Working solver.

- Cleans and speeds up.
- Uses a PHP Generator to compute permutations.