Refactored and commented setting system.