fix up automatic cast between double and int. remove comments about 'level'