Fix thre functions not using new structure