Refactor, use angular to display messages