Gravity reconstruction and refactor