Moved createParagraphs on $scope