Add output class and improve config options