moved rendering logic from Content class to ContentHandler class