Added gravity functions

I might have messed up the merge by doing the git commit/pull/merge in the wrong order. Decline this merge if I did it improperly and let me know what I messed up