Cleaned up modal-bar transition code.