Incorporate @briancavalier's suggestions