Replaced some pattern matching on options with Folds. Added some Test classes that I'll write them I have time