Added unit test for least squares agg and fixed view.html handling old links