Fix fatal error in newsletter plugin, minor code cleanup (#590)