Improve mutex management on state change.
Remove server project to build a separate project about legrand gateway simulation