Better tracking for branches and directories