Cleaned up warnings
Improved server restart with respect to thread concurrency.