template fixes, writing fixes.