1. Correct how activity counters are restored.
2. Exclude .metadata directory from the repo.