Monitor structure defined. Still missing the thread handling