removed unused variables
fixed global vars scope
added -Wall -Werror to Makefile
updated TODO