Added memory fences, guards and shared configuration