Split template implementation from header (closes #27)