Add test for set, and some code cleanup whilst prepping for it