Cleaned up point-lp and cost, grad computation