Split source files into smaller ones.

Because it was hard to navigate through the source code.