Working shuffling logic

The logic is not working but should soon, need more work. Check loops
Merge pull request #4 from thefenry/functional-code

Working shuffling logic