Renamed some variables to avoid conflicts