More cleanups and a template based version which adds events, only withou parameters.