Some fixes
Renamed variables