fix warnings, and add Makefile for plugins