#130 Added hander.close() method functionality. Complicated onEmbeddedContentHandler functionality.