Move more internal stuff to namespace detail