Added acceleration due to gravity
Generalized functions to account for changes in gravity