Move code to wowza plugin