only add gravity if needed
code cleanup
improved demo code a bit
better menu for Demo