Rearrange variable assignment to minimize code / simplify.