refactored config editing for easier use, add more doc