cleanup linalg