Refactored into a Node application