Pass11 done. TODO: Comment main programming logic