Updates to Flask and Javascript code