simplified getStreamUrl and move deps around