Working on simplified version using more features of template system