Added template and database functionality and output processor control.