add a filter to allow putting main code elsewhere than into the main plugin file. Correct a javascript ussue