Some changes to migrate to new angularjs templates