Tidying up request.js file for easier reading