removed const on cutWeight
fixed uint->int comparison warnings