Finishing touches

- Answered question 8 and debriefing
- Added types
- Fixed permutations function