Some early efforts at linear solver and associated fixes