added first classes for server and threads.