Revert "Revert "Revert "Updates recommended by Triffid"""

This reverts commit 2899e152e93f28d6e837f62503235da4ac45244b.
Updates recommended by Triffid

Renamed variable
fixed identation