push requested improvements to Yomitan PR

Removing duplicate code: https://github.com/themoeway/yomitan/pull/636/commits/e95066f1bd101248fc02d5ee9184ad89cf1c6d2a