Added email notification to obs exports, some optimization and bugfixes.