changed templating engine from SimpleTemplate to Jinja2, moved some of the API processing to the server side to reduce page load times from client