Cleanup of static variables/functions.
Merge branch 'master' into atari