Angular added, functions moved from html to angular.