More code rework and testing