Static everything so that we can see what is not really used + avoid forward prototypes thus shuffle things around a bit (no functional change)
More statics and dead/unused code pruning