Refactoring create customer code.