Some small refactors on the errors template
Merge branch 'refactor2' into dev