Minor updates as per Alice's feedback: swapping result variables for immediate returns.