Began the buildPayload function, also wrote part of the test script