removed some unused variables

and added -Wall and -Werror to compiler flags