Fixed a really stupid error, and prettied a variable name or two.