Converted life.js to Node module