Added template path stack and updated array to 5.4