Total rewrite of preferences functions. Added config file module (cfgfile.py) and enabled its use in the script. Prefs are now persistent between program launches. Also some misc GUI modifications.