Changed the routes and functions such that the user has the option of getting the graph either with or without rendering