write contentBefore and buffered content in case of destruction
prettify and OOPify