Refactored settings parsing and loading