Refactor for pi-svg click-and-spin