- rewrote plugreg script to handle the new REST api

- cleaned up some code