Refactoring

part 1