template fixes
merge upstream
cleanup