Inline doc and cleanup