Class method should have 'cls' as first argument
Whitespace
Line length
Simplify

And hopefully not break in the process of doing so.