Make some functions static
Merge pull request #947 from lioncash/statics

Make some functions static