copyright headers and some pycharm cleanup
refactor the main preferences window - issue #8