rearrange settings and fix some pylint complaints