Link works. What exactly do you intend to do with the functions, replace your current setup? Or what kind of variables do you need to, as you say, calculate?
I'm sorry, I'm just having a hard time figuring out which parts you're happy with and what you want to change.