Update gane.c

Some changes
Update gane.c

Stream handling added