Added basic list operations; used templates for printing