rewrite the source code layout.

support windows vs 2005.