Refactor

With CPython:
Before: 0.501s (Python2 2.7.8)
After 8ce001a68839fa4db568b3fe58ff07551d8b6745: 0.296s (Python 3.4.1)
After 021c2d1fe6d7a0459d0cbf71e09f2f756e1d39e4: 0.217s (Python 3.4.1)
After 7f7e4644850374d2c6cb1fa5e0215c9eb3a685be: 0.197s (Python 3.4.1)

With PyPy:
Before: 0.177s (PyPy 2.4.0)
After 8ce001a68839fa4db568b3fe58ff07551d8b6745: 0.252s (PyPy3k 2.3.1)
After 021c2d1fe6d7a0459d0cbf71e09f2f756e1d39e4: 0.225s (PyPy3k 2.3.1)
After 7f7e4644850374d2c6cb1fa5e0215c9eb3a685be: 0.204s (PyPy3k 2.3.1)