Node.js class for modeling behaviors