API cleanup: add things into the detail:: namespace