Refactor to match CodePen Example