Improvements in plugin system and minor cleanup, more to come!