Added -Wall to compiler option and fixed all warnings