Added MAC generation and example template