move templates out of lib