Clean up compiler warnings (correctly use of uint vs int)