Changed some types from int to zint + added a few casts