refactors node servers to be more modularly defined