Added -Wall and fixed warnings