Fix for issue #3 (re-apply truncate function as the text is updated in the model)
Some configurations for JSHint