Moving the logic of the node to the correct files