Changed some variable names to make everyhing more consistent