Changed the reader thread class and removed use of parsemessage class,
instead created abstract class which extended for each type of message