Changed name of setting; simplified and optimized some logic.