declare some global variables as static in functions.cpp
ix whitespace issues in functions.(cpp|h)
Merge pull request #173 from thisch/functions_cleanup

Functions cleanup