Adds partial render to clean up views and $endpoint global variable