Updates for gravity.py