code cleanup & set "container" field for tw_hints