Rewrote variable names to be more expressive