Added refactored code changes