Gravity added
Refactoring