Reworked gravity behaviors
cleaned gravity code