add some plugin settings and reorganized the scripts