Converted weasel.js to Node style