Minor plugin cleanup and improvements.