Some refactoring.
Some refactoring