JavaScript and controller changes