Renamed some variables appropriately