Clean unused template code