Move js into model collection and views