LILY-241: small refactors
LILY-241: moved templates