changes main.controller vars to $scope