Renamed variables and added changes based on review. Bug 1350337.