Performed the firt code refactoring