Refactored a little while attempting to review

However given how well my brain is functioning right now (it's not),
this should hardly count as an adequate peer review.