use bool type where appropriate
cleanup code
use WLEVEL_... macros for warning level