proper cleanup

used your scripts but they didn't do filtering on tags/branches and calling gc twice is not necessary.