Changing some variable types from unsigned int to byte.