Refactors gravity management