Set some functions as static, fixed warning.
Removed useless function.