[Refactor] split source into several files.