save settings optimizations attempt
save plugin settings optimized + cleaning code

- settings are now saved when closing UI instead of every 7 sec, this
should help with performances, shouldn't it ?