Modified to prepare for angular.