Fix compile errors (missing function declaration).
Fix const pointers conversion.
Static local functions and remove them from headers.
Static global variables.
Fix GTK type conversion.
Remove usage of deprecated gtk api.
Remove unused variables.