Added rate limiting feature to stream (fixes #4)