Revert "Removed some unused variables"

This reverts commit d67e0eb54c17d032a207e8c7b825a1bc8d64161a.