Converted to plugin and added some key files