refactored Settings and I/O