template fixes, more work on the team package/pragmas