Slight refactor
Added some more tests & coverage