Shifted from settings[] to bools and ints, refactored code