added template loader and removed lucene dependency