making more use of unfold where possible
more use of unfold rather than adhoc functions
improved the implementation of some core stuff and added shuffle product and a couple of initial tests