Fix a few warnings.
We don’t need extern data types spread all over the source files.
Declare functions only used in one file as static.
Use random (lowercase) instead of QuickDraw’s Random (uppercase).