Move parseBody function to parser.js file