Refactoring applied, functionality added.