Refactored to new NodeJS and modules