Added -Wall flag and removed all warnings