fixed the clean branch logic to check for new, untracked files; implemented tests for unit scenarios