Move a few prototypes and static'ed a few functions