Added Client Thread, refactoring server logic into ServerThread class.
Separated server and client code refactored into separate threads.