Fixed a bunch of strict warnings by making functions static.