Restructure for running on node