Revert "Refactored out problem specification"

This reverts commit 1319673fea896e8c24a3186f992bdfae41954722.
Revert "Refactored to OO principles"

This reverts commit b3212afb8ce47664a9755f37e1727a3a0c82b050.
Revert "Refactored to higher order functions"

This reverts commit 1e2fae300d40f208ab2781384202fd04e01e41dc.