[Did] some refactoring.