Refactor some components. But currently it still cannot run.