Rewrote sepstream and tokenstream to be less ugly