use chart enum, fix Iif, ByVal, comment out unused declarations