Finally done with refactoring.