Move internal definitions to src/internal.hpp