Mark functions static if not used elsewhere and use proper prototypes