Update & reorganize code in two project.