Minor fixes in Modules handles and introduction of threads into each module
The modules are applied inside a different thread in order to avoid lag
in the main window while processing. This still need further testing
A new flag is added to selected if the threads should be used in this
purpose