Added configuration options and code for both types of MAC generation.