Solution 96 Refactored

I never want to look at this again.