First commit by syncxplus, some customized changes.