Using singleton class server to avoid thread problems, project is now thread safe