Reduce duplication and refactor code a little bit
Reduce duplication and refactor code a little bit

UITools/saleor,UITools/saleor,UITools/saleor,maferelo/saleor,UITools/saleor,mociepka/saleor,maferelo/saleor,maferelo/saleor,UITools/saleor,mociepka/saleor,mociepka/saleor