quiet compiler warnings building with gcc and clang.
- define variables and functions as static when not declared by headers.
- remove some unused defines.
- other minor changes to quiet warnings.
Merge pull request #4 from ideasman42/master

quiet compiler warnings building with gcc and clang.