remove templates/ and clean up endpoints