[templates] fix lib header ordering
[templates] more succinct header