Made code more simple
Changed stream data structure to easier debug