Refactor github issue #60