Refactors/fixes some bugs in news plugin
Adds news database SQL for logging output