Added basic plugin and event system.