added directory level template search
added property replace function