optimize tsmain.cpp and make sure it works properly, remove the returns and comment extraneous stuff out of client.cpp