created parent class for monitors and refactored some associated code