Re-initializing masonry when items are added or removed.