Refactor variable assignment for clarity