Added new code from Flowdoc