Tweaked js, changed controller to work with formater