High/medium/low resolution DFT templates added and code modified respectively