Small changes to javascript and views