performance improvements and basic plugin core