Did you try code components? Learn about it here: http://docs.oxygenhq.org/adv-guide-code-comp.html
and a video on it here: https://www.youtube.com/watch?v=Ml1Cp4KYXSM.
Description from video:
If your tests use the same code parts over and over again, this video will definitely make your working method more efficient, as if you need to fix your code, you will only need to fix it in one script file!
Introducing code components - a simple and easy way to call functions from any script , and each script can send different data.