Added -Wall to compile command in makefile
scanner.c is simplified, formatted and documented