Revert 83f873f..c8896e3

This rolls back to commit 83f873fc65bec7bec79cd9aa7cadce2b9c57b158.
variable scope