Refactored steam.coffee (rewritten from scratch)