too many errors. Disabled -Werror
fixed some warnings