Some basic cleanup and fixes to plugins form to fix #353