Add the remaining static keywords to local functions. Consistently order the include files.