Improved OutWriter flushing and closing
Moved stylesheet content into a embedded resource