Refactor codes in eshop.