Merge with dev

Added  set_debug_level/get_debug_level

Improved Event reporting

added better var creation