Resolving further conflicts...manually re-adding changes to collapse.js in light of changes that have since happened in master