Rewrote folds to make it more readable
Merge pull request #23 from MattWis/dev

Rewrote folds to make it more readable