cleanup vi code
use bool type and true/false macros for better portability