refactor all render/stream functions; add bluebird helper