reorganized code. client and server are programs using core.
added loging config.