Refactored user code.