reorg tinymcd code