refactored templates to slices instead of linked lists. not tested
Moved public template functions to top of template file. Renamed the ReadTempl function the New