Converting the forecast plugin to a proper spice2 plugin, plus code cleanup.