move some static declarations to .c from .h