Refactor accordion component.