Remove duplicate code in petclaw state object.

As suggested by @ahmadia.