Move static functions from .h to .c