Separated out RestartFuncs; refactored rules and tree nodes