Refactor (simplified, reduced ABC)

Learnt some more ruby (I couldnt work out how destructuing assignments
for lists worked: parens - who knew)  and simplified the branching
complexity of the original implementation.