Added -Wall flag to compile line and fixed all warnings.