added const-ness to derivative fields.  moved all the connection/ricci/gaussian curvature calculations into their own function (so you can calculate them for arbitrary metrics)