Round one of linalg cleanup