better code structure, maybe
Fixing conflict and new template