Implement set and dec, fix some mistakes, only allow UINTs