Added static keyword to functions
reducing splint -weak errors