Moved monitoring and analyzing out into classes