Refactor empty section remove into shared method