Added some code to Requests and refactor of json formation