Enhance accordion and reduce code.