Mutable class attributes scare me a bit :)

Could you add some tests to demonstrate that the code is correct? Thanks.