Gravity

Changed some things related to gravity as they were broken in my last
commit. I think that it might be a good idea to stop using the built in
gravity function and make our own. Any thoughts?