Moved marking dependencies to the root function