Added support for various types of writers.