Move functions from dependencies to header for architecture reasons