Changed some variables to int.