Centeralized all "nbconvert sphinx block" logic (macros)
Added more comments and header comments.