Better copying of plugins to target directories
Putting window handling code into their own files