Make more functions static and prefix with __

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>