Refactored user edit