Changed defined var to work from the class
Added set Template Dir method