Fixed repository structure and improved plugin code