Revert "2nd attempt at set gravity code"

This reverts commit fcabfbba0533aa9038c14b66ab81a59421afd3a1.