Updated with @treyhunner's suggestions