Refactoring and upgrade to DragonNode.js 3.*