modified main.js and controllers.py