Changed a few variable names to provide clarity