finalised the plugin code and rearranged files