Refactor core plugin, add extensions, improve API in general
Update debug to reflect recent changes in core