Started making the payload code neater