code repositioning. no change in behaviors but the code became more modular.

--HG--
branch : 2.0