added default code templates and fixed bug in timing of traffic shaping
in FrameQueueBuffer