Embedded lock in to server struct

cleaner code FTW!!!