Turned core into a plugin and added settings