Good read. Just a thought: Does this match Swift 3 syntax patterns?
Haven Barnes

Hi Haven, the code snippet does not in fact match Swift 3 patterns, since it was written while using swift 2.3. But thanks for bringing this up, I’ll update the syntax soon and probably make the function into an init method rather than a class function.