Add user editing integration test

Move coverage folder into tests
Extract and move templates.js

Improve coverage measurement by removing templates from application code
Split coverage result between integration and unit tests
Defer initialisation application in unit tests