More tests.
Removing smelly code.