Move doc-comments back to function implementations