Move Coded*Stream into separate file
Working on correct error handing