moved tamplates directory to root directory; changed hardcoded paths to dynamic