Dev

Bug fix , optimize codes , add unit test of some modules!