Simplify js controller
unused code
Simplify code