Refactoring.
Bug fix.