Extend logging

Increase the amount of logging in the system
Clean up all templates