updated templates module way of presenting and refactored module prehandling