Inline docs & minor code tweaks